Skip to content

fix(cli): surface GraphQL submission lookup failures as read_failed#1493

Open
kiannidev wants to merge 1 commit into
entrius:testfrom
kiannidev:fix/1492-find-prs-lookup-failure
Open

fix(cli): surface GraphQL submission lookup failures as read_failed#1493
kiannidev wants to merge 1 commit into
entrius:testfrom
kiannidev:fix/1492-find-prs-lookup-failure

Conversation

@kiannidev

Copy link
Copy Markdown

Summary

  • Propagate None from _search_issue_referencing_prs_graphql through find_prs_for_issue instead of coercing to []
  • Return None from fetch_open_issue_pull_requests when GraphQL lookup fails
  • Emit structured read_failed JSON error from gitt issues submissions --json instead of {success: true, submission_count: 0}

Related Issues

Fixes #1492

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • Updated tests/utils/test_github_api_tools.pyNone returned on GraphQL errors / lookup failure
  • Added tests/cli/test_issue_submission.py--json returns error.type == read_failed when lookup fails
  • uv run pytest tests/utils/test_github_api_tools.py tests/cli/test_issue_submission.py

Checklist

  • Code follows repository conventions
  • Self-reviewed the diff
  • Focused change; no unrelated edits

Stop coercing find_prs_for_issue None sentinel to an empty list so
gitt issues submissions --json no longer reports success with zero
submissions when GitHub cross-reference lookup fails.
Fixes entrius#1492
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jun 17, 2026
@anderdc

anderdc commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

This changes CLI output (gitt issues submissions --json). CLI changes need screenshots of the before/after command behavior accompanying the PR — please add them.

@kiannidev

Copy link
Copy Markdown
Author
Screenshot_56 Screenshot_57

@anderdc
I uploaded images before and after updating..

And please review #1491 again.
I messaged to you there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] find_prs_for_issue treats GraphQL lookup failures as zero submissions

2 participants